[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-----------+##############################################################
#+-| A_RECNO() |--------------------------------------------------+###########
#| +-----------+ Returns current record number in specified alias |###########
#+----------------------------------------------------------------+###########
##############################################################################
##############################################################################
#+--| Summary |------------------+############################################
#| #INCLUDE database.hdr |############################################
#+-------------------------------+############################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------+##################################
#| FUNCTION LONG a_recno PROTOTYPE |##################################
#| PARAMETERS ALIAS aliasname |##################################
#+-----------------------------------------+##################################
##############################################################################
##############################################################################
############+---| Description |----------------------------------+############
############| The a_recno() function returns the current record |############
############| number for the specified aliasname. |############
############| -------------------------------------------------- |############
############| The a_recno() function performs identically to the |############
############| recno() function. a_recno() differs syntactically |############
############| in that it accepts an alias as a parameter. |############
############+----------------------------------------------------+############
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Create a listing of accounts receivable. |#########
#########| |#########
#########| DO WHILE .NOT. a_eof( acnt ) |#########
#########| IF acnt-owed > 0 |#########
#########| ? a_recno( acnt ), acnt->customer |#########
#########| ENDIF |#########
#########| !acnt SKIP |#########
#########| ENDDO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * See if two databases are identical. The |#########
#########| * loop fails if record number is out of sync. |#########
#########| * (i.e., one record is deleted and the other |#########
#########| * is not) |#########
#########| |#########
#########| DO WHILE .NOT. a_eof( a ) .AND. a_eof( b ) |#########
#########| IF a_recno( a ) <> a_recno( b ) |#########
#########| DO report_err |#########
#########| ENDIF |#########
#########| !a SKIP |#########
#########| !b SKIP |#########
#########| ENDDO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
a_reccount()
reccount()
recno()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson